package org.springblade.third.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


@Data
@EqualsAndHashCode(callSuper = true)
@TableName("blade_original_info")
public class OriginalInfo extends BaseEntity {

    @Schema(description = "渠道主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(description = "请求流水号")
	private String reqNo;

    @Schema(description = "外部请求流水号")
    private String outReqNo;

	@Schema(description = "产品编码，唯一标识不同产品")
    private String productCode;

	@Schema(description = "订单ID")
	private String orderId;

	@Schema(description = "订单编号: 有的数据源会以订单编码为维度")
	private String orderSn;

	@Schema(description = "姓名")
	private String realName;

	@Schema(description = "手机号")
	private String phone;

	@Schema(description = "身份证")
	private String idCard;

	@Schema(description = "查询来源")
	private String sourceType;

	@Schema(description = "终端编号")
	private String terminalNo;

	@Schema(description = "请求参数")
	private String reqData;

	@Schema(description = "第三方响应原始数据")
	private String retData;

	@JsonFormat(pattern = DateUtil.PATTERN_DATETIME, timezone = "GMT+8")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
	@Schema(description = "创建时间")
	private Date createTime;
}
